package org.hope.ontology.owlApi;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import org.hope.nlp.SearchTerm;
import org.hope.util.ReturnData;
import org.semanticweb.owlapi.model.OWLAnnotationProperty;
import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.OWLClassExpression;
import org.semanticweb.owlapi.model.OWLEntity;
import org.semanticweb.owlapi.model.OWLIndividual;
import org.semanticweb.owlapi.model.OWLNamedIndividual;
import org.semanticweb.owlapi.model.OWLNamedObject;
import org.semanticweb.owlapi.model.OWLObjectHasValue;
import org.semanticweb.owlapi.model.OWLObjectIntersectionOf;
import org.semanticweb.owlapi.model.OWLObjectProperty;
import org.semanticweb.owlapi.model.OWLObjectPropertyExpression;
import org.semanticweb.owlapi.model.OWLObjectUnionOf;

/**
 * @author Thilanka
 */
public interface OntologyManager
{
	public static final String TRAVEL_ONTOLOGY = "ontology/travel.owl";
	public static final String TRAVEL_IRI = "http://www.travel.net/ontologies/travel.owl";

	public static final String TRAVEL_FACT_ONTOLOGY = "ontology/travelFacts.owl";
	public static final String TRAVEL_FACT_IRI = "http://www.travel.net/ontologies/travelFacts.owl";

	public static final String TRAVEL_ANNOTATION_ONTOLOGY = "ontology/travelAnnot.owl";
	public static final String TRAVEL_ANNOTATION_IRI = "http://www.travel.net/ontologies/travelAnnot.owl";

	public static final String strApDisplayName = "http://www.travel.net/ontologies/travelAnnot.owl#displayName";
	public static final String locationCode = "http://www.travel.net/ontologies/travelAnnot.owl#locationCode";
	public static final String code = "http://www.travel.net/ontologies/travelAnnot.owl#code";
	public static final String name = "http://www.travel.net/ontologies/travelAnnot.owl#name";
	
	public static String strApRefineQuestion = "http://www.travel.net/ontologies/travelAnnot.owl#refineQuestion";
	public static String strApRefineOption = "http://www.travel.net/ontologies/travelAnnot.owl#refineOption";

	public ReturnData<String> init();

	public List<SearchTerm> getOntologyTerms( List<SearchTerm> searchTerms );

	public OWLClass getOWLClass( String iri );

	public OWLObjectUnionOf getOWLObjectUnionOf( Set<OWLClassExpression> expressions );

	public OWLObjectProperty getObjectProperty( String iri );

	public OWLObjectIntersectionOf getOWLObjectIntersectionOf( Set<OWLClassExpression> expressions );

	public OWLObjectHasValue getOWLObjectHasValue( OWLObjectPropertyExpression property, OWLNamedIndividual value );

	public Set<OWLNamedIndividual> getMatchingIndividuals( String strType, String strRelation, String strValue );

	public OWLObjectHasValue getClassExpressionForObjectProperty( OWLObjectProperty property, OWLIndividual instance );

	public Set<OWLNamedIndividual> getIndividuals( OWLClass cls );

	public Set<OWLNamedIndividual> getIndividuals( OWLClassExpression clsEx );

	public Set<OWLNamedIndividual> getIndividuals( String classIri );

	public OWLNamedIndividual getNamedIndividual( String iri );

	public Set<OWLClass> getSubClasses( OWLClass owlClass );

	public Set<OWLClass> getSubClasses( OWLClass owlClass, boolean direct );

	public Set<OWLClass> getSuperClasses( OWLClass owlClass );

	public Set<OWLClass> getSuperClasses( OWLClass owlClass, boolean direct );

	public Set<OWLNamedIndividual> getInstances( OWLClass owlClass );

	public Set<OWLNamedIndividual> getPropertyHolders( OWLNamedIndividual individual, OWLObjectProperty property );

	public String getAnnotationPropertyValueString( OWLEntity entity, OWLAnnotationProperty property );
	
	public OWLAnnotationProperty getOWLAnnotationProperty( String iri );
	
	public ArrayList<OWLNamedObject> getAnnotationPropertyValueObjects( OWLEntity entity, OWLAnnotationProperty property );
}
